package home.dao;

import home.model.Goods;
import home.model.Users;
import home.model.minUsers;

import java.util.List;

import net.sf.json.JSONObject;

public interface UsersDao {
	public List findByUsersIdPwd(Object une,Object pwd);
	public List findByOneProperty(String className,String property,Object value);
	public List findByTwoProperty(String className,String property1,String property2,Object value1,Object value2);
	public Users findByUsername(String username);
	public Users addUsers(String username, String password, String salt, String name, String main_type, String sex);
	public boolean saveUsers(Users users);
	public List<Users> getAllUsers();
	public Users findById(int id);
	public boolean deleteUsersById(int id);
	public String nadianSome(Users users, String type);
	public List<minUsers> searchUsers(List<minUsers> usersList, String location);
	public Users randUsers();
	public String winGetSome(Users win, Users lost, String type);
    public List<minUsers> queryForPage(final String hql,final int offset,final int length);
    public int getAllRowCount(String hql);
    
    public minUsers findByIdFromMinUsers(int id);
    public List<minUsers> getAllMinUsers();
}
